• How to Upgrade Ghost

    General Computing ghost blog upgrade how to
    1
    2 Votes
    1 Posts
    493 Views
    ScuzzS
    Usually the upgrade process for various web based software is very simple. Enter a few commands over SSH, run a script or even upgrade via an admin control panel. Upgrading the Ghost blogging platform is very similar. In this post I will run you through a very quick way of upgrading Ghost to the latest version. How to Upgrade a Ghost Blog Before you upgrade any software it is always recommended to backup all your data. Luckily Ghost has a simple way of backing up. Log into your blog admin control panel and then go to Settings > Labs. Now click the export button. This will download a .JSON file. This file can be used to restore your blog. It is also recommended that you backup your images and theme in your \ghost\content\ directory. This can be done by logging into your server via FTP, SFTP or any other method of accessing your server for file transfers. SSH into your server CD \to\ghost\installation\folder wget http://allaboutghost.com/updateghost chmod +x updateghost ./updateghost The script will run and once it has finished you can now run ghost with your preferred method. At BitBangers we like to run our Ghost blog with Forever. So to get our blog up and running again we need to enter the following command. NODE_ENV=production forever start index.js If the script has run correctly you should have a fully update Ghost instance running. Below is the contents of the updateghost script. #!/bin/bash # Written by Andy Boutte and David Balderston of howtoinstallghost.com, ghostforbeginners.com and allaboutghost.com # updateghost.sh will update your current ghost install to the latest version without you losing any content if [ -f config.js ] then echo `whoami` # Make temporary directory and download latest Ghost. mkdir temp cd temp curl -L -O https://ghost.org/zip/ghost-latest.zip unzip *.zip cd .. # Make database backups. for file in content/data/*.db; do cp "$file" "${file}-backup-`date +%Y%m%d`"; done # Copy the new files over. yes | cp temp/*.md temp/*.js temp/*.json . rm -R core yes | cp -R temp/core . yes | cp -R temp/content/themes/casper content/themes npm install --production # Delete temp folder. rm -R temp echo "You can now start Ghost with npm, forever or whatever else you use." else echo "Please cd to your Ghost directory." fi Thanks to HowToInstallGhost for proving the script and instructions.
  • 1 Votes
    1 Posts
    1k Views
    ScuzzS
    How to install Ghost on linux This tutorial will show you how to install and run Ghost on a Debian based Linux server. This guide presumes you have Node.js and NPM installed and running correctly. First of all you will need to download the Ghost software: curl -L https://ghost.org/zip/ghost-latest.zip -o ghost.zip Then you will need to unzip the Ghost software, we will unzip it to a ghost directory: unzip -uo ghost.zip -d ghost Now you will need to go into the ghost directory: cd ghost Once you are inside the ghost directory you will need to install all the dependencies that Ghost requires to run: npm install --production Once it has installed you can now go ahead and run the Ghost software: npm start To see your blog you will need to open http://127.0.0.1:2368 in your web browser. You can sign in to your control panel by visiting http://127.0.0.1:2368/ghost. Hopefully this has been useful to someone. Ghost is extremely easy to set up and install. There are other configuration option available for Ghost, such as SSL, an Nginx reverse proxy and running Ghost forever. I will write a separate tutorial for these later on; they are just as easy to set up!